<template>
	<view class="loan_account">
		<view class="top_background"></view>
		<!--  -->
		<view class="main">
			<view class="title">
				<image src="@/static/images/shop_icon2.png" mode=""></image>
				<text>个人销售货款账户</text>
			</view>
			<!--  -->
			<view class="num_info">
				<view class="money">{{ljsy}}</view>
				<view class="tip">累计卖货收益 (元)</view>
				<view class="info">
					<view class="text">
						<view class="price">{{ljmhe}}</view>
						<view class="txt">累计卖货额 (元)</view>
					</view>
					<view class="text">
						<view class="price">{{sell_num}}</view>
						<view class="txt">累计卖货单title数 (单)</view>
					</view>
				</view>
			</view>
			<!--  -->
			<view class="num_info">
				<view class="money">{{score}}</view>
				<view class="tip">积分余额 (元)</view>
				<view class="info">
					<view class="text">
						<view class="price">{{ljxf_score}}</view>
						<view class="txt">累计消费积分</view>
					</view>
					<view class="text">
						<view class="price">{{lscs}}</view>
						<view class="txt">累计零售区消费次数</view>
					</view>
				</view>
			</view>
			<!--  -->
			<view class="main_btn">
				<text class="btn1" @click="navBtn(1)">卖货交易记录</text>
				<text class="btn2" @click="navBtn(2)">进货交易记录</text>
				<text class="btn1" @click="navBtn(3)">积分转库存</text>
				<text class="btn2" @click="navBtn(4)">积分交易记录</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				ljsy:'',
				score:'',
				sell_num:"",
				ljxf_score:"",
				lscs:"",
				ljmhe:"",
			};
		},
		onLoad(opt) {
			this.ljsy=opt.ljsy
			this.score=opt.score
			this.sell_num=opt.sell_num
			this.ljxf_score=opt.ljxf_score
			this.lscs=opt.lscs
			this.ljmhe=opt.ljmhe
		},
		methods:{
			navBtn(type){
				if(type==1){
					uni.navigateTo({
						url:'/pages/shop/sales_records'
					})
				}
				if(type==2){
					uni.navigateTo({
						url:'/pages/shop/purchase_records'
					})
				}
				if(type==3){
					uni.navigateTo({
						url:'/pages/shop/inv_stock'
					})
				}
				if(type==4){
					uni.navigateTo({
						url:'/pages/shop/inv_records'
					})
				}
			}
		}
	}
</script>

<style lang="less">
	.loan_account{
		width: 100%;
		.top_background{
			position: absolute;
			z-index: 1;
			width: 100%;
			height: 300rpx;
			background: linear-gradient(180deg, #26C281, rgba(38,194,129,0.7) 46%, #F7F8FA);
		}
		.main{
			position: relative;
			z-index: 2;
			width: 100%;
			padding: 0 24rpx;
			.title{
				width: 100%;
				padding: 40rpx 16rpx;
				display: flex;
				align-items: center;
				image{
					display: block;
					width: 56rpx;
					height: 56rpx;
				}
				text{
					padding-left: 16rpx;
					font-size: 32rpx;
					font-family: PingFang SC-Medium, PingFang SC;
					font-weight: 500;
					color: #FFFFFF;
				}
			}
			.num_info{
				width: 100%;
				margin-bottom: 24rpx;
				padding: 40rpx 0;
				background: #fff;
				border-radius: 10rpx;
				.money{
					width: 100%;
					text-align: center;
					font-size: 48rpx;
					font-family: OPPOSans-Bold, OPPOSans;
					font-weight: bold;
					color: #222222;
				}
				.tip{
					padding-top: 8rpx;
					width: 100%;
					text-align: center;
					font-size: 28rpx;
					font-family: PingFang SC-Regular, PingFang SC;
					font-weight: 400;
					color: #999999;
				}
				.info{
					width: 100%;
					padding-top: 50rpx;
					display: flex;
					.text{
						width: 50%;
						border-right: 1rpx solid #EBEBEB;
						text-align: center;
						.price{
							width: 100%;
							text-align: center;
							font-size: 32rpx;
							font-family: OPPOSans-Bold, OPPOSans;
							font-weight: bold;
							color: #222222;
						}
						.txt{
							padding-top: 8rpx;
							width: 100%;
							text-align: center;
							font-size: 24rpx;
							font-family: PingFang SC-Regular, PingFang SC;
							font-weight: 400;
							color: #999999;
						}
					}
					.text:last-child{
						border-right: none;
					}
				}
			}
			.main_btn{
				width: 100%;
				padding-top: 100rpx;
				display: flex;
				justify-content: space-between;
				flex-wrap: wrap;
				text{
					display: block;
					margin-bottom: 24rpx;
					width: 332rpx;
					height: 80rpx;
					line-height: 80rpx;
					border-radius: 40rpx;
					font-size: 32rpx;
					text-align: center;
					font-family: PingFang SC-Regular, PingFang SC;
					font-weight: 400;
				}
				.btn1{
					color: #fff;
					background: #26C281;
				}
				.btn2{
					color: #26C281;
					border: 1rpx solid #26C281;
				}
			}
		}
	}
</style>
